SELECT     
P.REGION, 
ACCT_MGR_MTD.ACCT_MGR, 
PRODUCT, 
FEATURE, 
MTD, 
PMTD, 
PMON, 
MTD / (LAST_DAY / DOM) AS PACING, 
CASE WHEN PMON = 0 THEN 0 ELSE CAST(MTD / (LAST_DAY / DOM) 
                      AS DECIMAL(20, 6)) / PMON END AS PACE_RATE
FROM         (SELECT     MTD.ACCT_MGR, MTD.PRODUCT, MTD.FEATURE, MTD.NET AS MTD, PMO.NET AS PMON, PMT.NET AS PMTD, DAY(DATEADD(d, 
                                              - DAY(DATEADD(m, 1, @Date)), DATEADD(m, 1, @Date))) AS LAST_DAY, DAY(GETDATE() - 1) AS DOM
                       FROM          (SELECT     ACCT_MGR, PRODUCT, FEATURE, 
                                                                      CASE PRODUCT WHEN 'IPTV' THEN IPTV_NET WHEN 'HSIA' THEN HSIA_NET WHEN 'VOIP' THEN VOIP_NET END AS NET
                                               FROM          SCORE_MTD_SALES_ROLLUPS.ACCT_MGR
                                               WHERE      (TEMP = 'MTD')) AS MTD INNER JOIN
                                                  (SELECT     ACCT_MGR, PRODUCT, FEATURE, 
                                                                           CASE PRODUCT WHEN 'IPTV' THEN IPTV_NET WHEN 'HSIA' THEN HSIA_NET WHEN 'VOIP' THEN VOIP_NET END AS NET
                                                    FROM          SCORE_MTD_SALES_ROLLUPS.ACCT_MGR AS ACCT_MGR_1
                                                    WHERE      (TEMP = 'PMO')) AS PMO ON PMO.ACCT_MGR = MTD.ACCT_MGR AND PMO.PRODUCT = MTD.PRODUCT AND 
                                              PMO.FEATURE = MTD.FEATURE INNER JOIN
                                                  (SELECT     ACCT_MGR, PRODUCT, FEATURE, 
                                                                           CASE PRODUCT WHEN 'IPTV' THEN IPTV_NET WHEN 'HSIA' THEN HSIA_NET WHEN 'VOIP' THEN VOIP_NET END AS NET
                                                    FROM          SCORE_MTD_SALES_ROLLUPS.ACCT_MGR AS ACCT_MGR_2
                                                    WHERE      (TEMP = 'PMT')) AS PMT ON PMT.ACCT_MGR = MTD.ACCT_MGR AND PMT.PRODUCT = MTD.PRODUCT AND 
                                              PMT.FEATURE = MTD.FEATURE) AS ACCT_MGR_MTD
INNER JOIN 	
(	SELECT DISTINCT REGION, ACCT_MGR
	FROM         SCORE_ACC_PROPERTIES.PROPERTIES
) P ON P.ACCT_MGR = ACCT_MGR_MTD.ACCT_MGR	